// api.js
import request from '@/utils/request.js';

//Post的示例代码  也是登录
export const addFriend = (data) => {
    return request({
        url: '/users/addFriend',
		method: 'POST',
		data
    });
};

//getFriendList 获取等待添加好友
export const getFriendList = () => {
    return request({
        url: '/users/getFriendList'
    });
};



//agreeFriend 添加好友
export const agreeFriend = (data) => {
    return request({
        url: '/users/agreeFriend',
		method: 'PUT',
		data
    });
};

//deleteFriend 删除好友
export const deleteFriend = (data) => {
    return request({
        url: '/users/deleteFriend',
		method: 'DELETE',
		data
    });
};

//getMyFriendList 获取自己的好友列表
export const getMyFriendList = () => {
    return request({
        url: '/users/getMyFriendList'
    });
};
